home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / TestParts / Draw / DwPtInit.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-01  |  1.9 KB  |  81 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        DwPtInit.cpp
  3.  
  4.     Contains:    Init routines for the EditorSetup part library
  5.  
  6.     Owned by:    Eric House
  7.  
  8.     Copyright:    © 1994 - 1996 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <2>     5/24/96    jpa        1246074: Call Mwerks init/terminate fns for
  13.                                     native exceptions.
  14.         <12>    10/11/95    JBS        1290487 fix to allow editor swapping
  15.         <11>     9/29/95    TJ        Removed the SOMInit Routine.
  16.         <10>      9/4/95    TJ        Added Includes to Compile with out
  17.                                     PC-Headers.
  18.          <9>     8/11/95    jpa        Call InitODMemory [1276412]
  19.          <8>     1/25/95    jpa        Renamed SOM class to Container [1213318]
  20.          <7>     1/12/95    jpa        Don't use obsolete Toolbox names [1211211].
  21.                                     Don't export CFM init [1210936]
  22.          <6>     9/29/94    RA        1189812: Mods for 68K build.
  23.          <5>      9/8/94    NP        Removed warning.
  24.          <4>     8/17/94    CG        #1181487: Call DrawPartNewClass to
  25.                                     instantiate DrawPart by name using SOM.
  26.          <3>     7/12/94    jpa        Call InitLibraryResources.
  27.          <2>      7/6/94    eeh        just testing....
  28.          <1>      7/6/94    eeh        first checked in
  29.  
  30.     To Do:
  31.     In Progress:
  32.         
  33. */
  34.  
  35.  
  36. /* #include <somcls.xh> */
  37. #include <som.xh>
  38. #include <somobj.xh>
  39.  
  40. #ifndef _ODMEMORY_
  41. #include <ODMemory.h>
  42. #endif
  43.  
  44. #ifndef SOM_AppleTest_Container_xih
  45. #include "DrawPart.xih"
  46. #endif
  47.  
  48. #ifndef _USERSRCM_
  49. #include <UseRsrcM.h>
  50. #endif
  51.  
  52.  
  53. #ifdef __MWERKS__
  54. extern "C" {
  55.     void __initialize();        // From Metrowerks runtime library, Startup.c
  56.     void __terminate();
  57. }
  58. #endif
  59.  
  60.  
  61. extern "C" pascal OSErr DrawPartCFMInit (CFragInitBlockPtr initBlkPtr);
  62. extern "C" pascal void  DrawPartCFMTerminate( );
  63.  
  64. pascal OSErr DrawPartCFMInit (CFragInitBlockPtr initBlkPtr)
  65. {
  66. #ifdef __MWERKS__
  67.     __initialize();        // Initialize static data and construct any global objects
  68. #endif
  69.     somNewClass(AppleTest_Container);
  70.     InitODMemory();
  71.     return InitLibraryResources(initBlkPtr);
  72. }
  73.  
  74. pascal void DrawPartCFMTerminate( )
  75. {
  76.     CloseLibraryResources();
  77. #ifdef __MWERKS__
  78.     __terminate();        // Destruct static objects & clean up exception tables
  79. #endif
  80. }
  81.